home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 15 / CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso / CUCD / Graphics / Ghostscript / source / ps2pdf.bat < prev    next >
Encoding:
DOS Batch File  |  1997-06-17  |  1.1 KB  |  51 lines

  1. @echo off
  2. rem Convert PostScript to PDF.
  3.  
  4. rem    NOTE: for questions about using this file on Windows NT, please
  5. rem    contact Matt Sergeant (matt.sergeant@iss-oxygen.co.uk).
  6.  
  7. set PS2PDFPARAMS=-q -dNOPAUSE -dBATCH -sDEVICE#pdfwrite
  8.  
  9. if "%OS%"=="Windows_NT" goto nt
  10.  
  11. rem    Run ps2pdf on any Microsoft OS.  The executable must be named gs.
  12.  
  13. set PS2PDFGS=gs
  14.  
  15. :run
  16. if "%1"=="" goto usage
  17. if "%2"=="" goto usage
  18. if not "%3"=="" goto usage
  19.  
  20. rem Watcom C deletes = signs, so use # instead.
  21. %PS2PDFGS% %PS2PDFPARAMS% -sOutputFile#%2 %1
  22. goto end
  23.  
  24. :usage
  25. echo "Usage: ps2pdf input.ps output.pdf"
  26. goto end
  27.  
  28. rem    Run ps2pdf on Windows NT.  The executable must be named gswin32c.
  29.  
  30. :nt
  31. set PS2PDFGS=gswin32c
  32. if not CMDEXTVERSION 1 goto run
  33. if "%1"=="" goto ntusage
  34. if "%2"=="" goto nooutfile
  35. if not "%3"=="" goto ntusage
  36.  
  37. rem Watcom C deletes = signs, so use # instead.
  38. %PS2PDFGS% %PS2PDFPARAMS% -sOutputFile#%2 %1
  39. goto end
  40.  
  41. :ntusage
  42. echo "Usage: ps2pdf input.ps [output.pdf]"
  43. goto end
  44.  
  45. :nooutfile
  46. set PS2PDF=%1
  47. set PS2PDF=%PS2PDF:.PS=.PDF%
  48. %PS2PDFGS% %PS2PDFPARAMS% -sOutputFile#%PS2PDF% %1
  49.  
  50. :end
  51.